﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_ManufactureList.cshtml";
}
<script>
    $(function () {
        initControl();
        treeView();
        gridList();
    });
    function initControl() {
        var myLayout = $('#layout').layout({ resizable: false });
        myLayout.sizePane("west", 200);
        $('select').bindSelect();
    }
    function treeView() {
        $("#itemTree").treeview({
            url: "/MainData/Storage/GetStrategyJson",
            onnodeclick: function (item) {
                //$("#txt_keyword").val('');
                //$('#btn_search').trigger("click");
                //alert(item.value);
                if (item.value != '') {
                    location.href = '/MainData/Storage/' + item.value;
                }
            }
        });
    }
    function gridList() {
        var $gridList = $("#gridList");
        $gridList.dataGrid({
            //url: "/SystemManage/User/GetGridJson",
            height: $(window).height() - 126,
            colModel: [
                { label: '货位类型', name: '', width: 80, align: 'center' },
                { label: '单位仓库', name: '', width: 80, align: 'center' },
                { label: '区位编号', name: '', width: 80, align: 'center' },
                { label: '货架编号', name: '', width: 80, align: 'center' },
                { label: '层数',     name: '', width: 80, align: 'center' },
                { label: '列数',     name: '', width: 80, align: 'center' },
                { label: '货架层号', name: '', width: 80, align: 'center' },
                { label: '货架列号', name: '', width: 80, align: 'center' },
                { label: '优先级别', name: '', width: 80, align: 'center' },
                { label: '使用标志', name: '', width: 80, align: 'center' },
                { label: '货位说明', name: '', width: 80, align: 'center' },
                { label: '推荐方式', name: '', width: 80, align: 'center' },
                { label: '创建人员', name: '', width: 80, align: 'center' },
                { label: '创建日期', name: '', width: 80, align: 'center' },
                { label: '创建时间', name: '', width: 80, align: 'center' },
                { label: '更改人员', name: '', width: 80, align: 'center' },
                { label: '更改日期', name: '', width: 80, align: 'center' },
                { label: '更改时间', name: '', width: 80, align: 'center' }
            ],
            pager: "#gridPager",
            sortname: 'F_DepartmentId asc,F_CreatorTime desc',
            viewrecords: true
        });
        $("#btn_search").click(function () {
            $gridList.jqGrid('setGridParam', {
                postData: { keyword: $("#txt_keyword").val() },
            }).trigger('reloadGrid');
        });
    }
    function btn_add() {
        $.detailOpen({
            id: "Detail",
            title: "",
            url: "/MainData/Storage/StrategyInput4"
        });
    }
</script>
<div class="ui-layout" id="layout" style="height: 100%; width: 100%;">
    <div class="ui-layout-west">
        <div id="itemTree"></div>
    </div>
    <div class="ui-layout-center">
        <form id="form1">
            <div style="padding: 12px 0 5px 0; padding-left: 15px; border-bottom: 1px solid #ccc;" class="line-table input-width-140">
                <div class="btn-group" style="margin-top:-9px;">
                    仓库名称<br /><input id="" name="" placeholder="" type="text" class="form-control required" /> &nbsp;
                </div>
                <div class="btn-group" style="margin-top:-9px;">
                    货位编号<br /><input id="" name="" placeholder="" type="text" class="form-control required" /> &nbsp;
                </div>
                <div class="btn-group" style="">
                    <a id="" class="btn btn-primary center-block" onclick=""><span class="glyphicon glyphicon-search"></span> 检索</a>
                </div>
                <div class="btn-group" style="float:right;">
                    <a id="" class="btn btn-primary center-block" onclick=""><span class="glyphicon glyphicon-refresh"></span> 刷新</a>
                    <a id="" class="btn btn-primary center-block" onclick="btn_add()"><span class="glyphicon glyphicon-plus"></span> 新增</a>
                    <a id="" class="btn btn-primary center-block disabled" onclick=""><span class="glyphicon glyphicon-edit"></span> 修改</a>
                    <a id="" class="btn btn-primary center-block disabled" onclick=""><span class="glyphicon glyphicon-trash"></span> 删除</a>
                    <a id="" class="btn btn-primary center-block" onclick=""><span class="glyphicon glyphicon-download"></span> 导出</a>
                </div>
            </div>
        </form>
        <div style="">
            <table id="gridList"></table>
            <div id="gridPager"></div>
        </div>        
    </div>

</div>

